package threadLocal;

/**
 * @author wang'ji'cheng
 * @date 2025/7/29
 */
public class Test {
    public static void main(String[] args) {
        ResourceDemo resourceDemo = new ResourceDemo();

        new Thread(()->{
            resourceDemo.set("rA");
            System.out.println(resourceDemo.get());;
        },"线程A").start();
        new Thread(()->{
            resourceDemo.set("rB");
            System.out.println(resourceDemo.get());;
        },"线程B").start();
    }
}
